package org.vizzini.xwingminiatures;

import java.util.List;

import org.vizzini.core.game.Agent;
import org.vizzini.xwingminiatures.swingui.WeaponAndDefenderChooser.WeaponAndDefender;

/**
 * Defines methods required by an agent for X-Wing Miniatures.
 */
public interface XWingAgent extends Agent
{
    /**
     * @return a list of new tokens.
     */
    List<XWingToken> buildSquad();

    /**
     * @param environment Environment.
     * @param adjudicator Adjudicator.
     * @param token Token.
     * 
     * @return a target token.
     */
    Maneuver chooseDecloakManeuver(final XWingEnvironment environment, final XWingAdjudicator adjudicator,
            XWingToken token);

    /**
     * @param environment Environment.
     * @param adjudicator Adjudicator.
     * @param attacker Attacker.
     * 
     * @return a target token.
     */
    WeaponAndDefender chooseWeaponAndDefender(final XWingEnvironment environment, final XWingAdjudicator adjudicator,
            XWingToken attacker);

    /**
     * @param environment Environment.
     * @param adjudicator Adjudicator.
     * @param attacker Token.
     * @param attackDice Attack dice.
     * @param defender Defender.
     * 
     * @return a new action.
     */
    ModifyAttackDiceAction getModifyAttackDiceAction(final XWingEnvironment environment,
            final XWingAdjudicator adjudicator, XWingToken attacker, AttackDice attackDice, XWingToken defender);

    /**
     * @param environment Environment.
     * @param adjudicator Adjudicator.
     * @param attacker Token.
     * @param attackDice Attack dice.
     * @param defender Defender.
     * @param defenseDice Defense dice.
     * 
     * @return a new action.
     */
    ModifyDefenseDiceAction getModifyDefenseDiceAction(final XWingEnvironment environment,
            final XWingAdjudicator adjudicator, XWingToken attacker, AttackDice attackDice, XWingToken defender,
            DefenseDice defenseDice);

    /**
     * @param environment Environment.
     * @param adjudicator Adjudicator.
     * 
     * @return a new action.
     */
    PlanningAction getPlanningAction(final XWingEnvironment environment, final XWingAdjudicator adjudicator);

    /**
     * @param environment Environment.
     * @param adjudicator Adjudicator.
     * @param attacker Attacker.
     * 
     * @return a new action.
     */
    ShipActionAction getShipActionAction(final XWingEnvironment environment, final XWingAdjudicator adjudicator,
            XWingToken attacker);
}
